<?php 
    $conn = oci_connect("hospital", "hospital", "//localhost/XE"); 
	$pull = oci_parse($conn, "select SURGEON_ID from ASSIGN where SURGEON_ID = $_POST[std_id]");
	$total = 0;
	oci_execute($pull);
	$total = oci_fetch_all($pull,$result);
	
	if( $total != 0){
		echo "This  ID  already have";
	}else{
		
		$add = oci_parse($conn, "INSERT INTO ASSIGN VALUES('$_POST[std_id]','$_POST[st_id]','$_POST[sta_id]')");
		oci_execute($add);
	}
 ?>
 
<html>
<head><meta http-equiv="refresh" content="1; URL=main.php"></head>
<BODY bgcolor = "#ffffff">
 <font color="#ffffff" size="20">Redirecting ...</font>
 </body>
 </html>